import type { GetCodeData, GetCodeParams, LoginCodeParams, LoginData, LoginParams, UserData } from "@/types/user";
import { request } from "@/utils/http";

export const LoginApi = (data: LoginParams) => request.post<null, LoginData>('/login/password', data) 

export const getCodeApi = (params: GetCodeParams) => request.get<null, GetCodeData>('/code', { params })

export const loginByMobileApi = (data: LoginCodeParams) => request.post<null, LoginData>('/login', data)

export const userInfoApi = () => request.get<null, UserData>('/patient/myUser')